package com.project.bean;

import java.time.LocalDate;

public class ProcessBean {
    /**进度ID*/
    private int id;
    /**员工对象*/
    private EmployeeBean employee;
    /**项目对象*/
    private ProjectBean project;
    /**该员工在该项目开始时间*/
    private LocalDate startDate = LocalDate.now();
    /**该员工在该项目结束时间*/
    private String endDate = "未完成";

    public ProcessBean() {
    }

    public ProcessBean(int employeeId, int projectId, LocalDate startDate, String endDate) {
        this.employee = new EmployeeBean();
        this.employee.setEmployeeId(employeeId);
        this.project = new ProjectBean();
        this.project.setProjectId(projectId);

        this.startDate = startDate;
        this.endDate = endDate;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public EmployeeBean getEmployee() {
        return employee;
    }

    public void setEmployee(EmployeeBean employee) {
        this.employee = employee;
    }

    public ProjectBean getProject() {
        return project;
    }

    public void setProject(ProjectBean project) {
        this.project = project;
    }

    public LocalDate getStartDate() {
        return startDate;
    }

    public void setStartDate(LocalDate startDate) {
        this.startDate = startDate;
    }

    public String getEndDate() {
        return endDate;
    }

    public void setEndDate(String endDate) {
        this.endDate = endDate;
    }

    @Override
    public String toString() {
        return "ProcessBean{" +
                "id=" + id +
                ", employee=" + employee +
                ", project=" + project +
                ", startDate=" + startDate +
                ", endDate='" + endDate + '\'' +
                '}'+"\n";
    }
}
